<!-- Derived from 'buildbot/status/web/templates/buildslaves.html'. -->
{% extends "layout.html" %}

{% block content %}

<h1>Buildslaves</h1>

<div class="column">

<table class="info">

<tr>
  <th>Name</th>
  {%- if show_builder_column %}
    <th>Pools</th>
  {%- endif %}
  <th>BuildBot</th>
  <th>Admin</th>
  <th>Last heard from</th>
  <th>Connects/Hour</th>
  <th>Status</th>
</tr>

{% for s in slaves %}
  <tr class="{{ loop.cycle('alt','') }}">
  <td><b><a href="{{ s.link }}">{{ cros_slave_name(s.name) }}</a></b></td>

  {%- if show_builder_column %}
    <td>
    {%- for entry in cros_builder_links(s.builders) %}
      <a href="{{ entry.link }}">{{ entry.name }}</a>
    {%- endfor %}
    </td>
  {%- endif %}


  <td>{{ (s.version or '-')|e }}</td>

  {%- if s.admin -%}
    <td>{{ s.admin|email }}</td>
  {%- else -%}
    <td>-</td>
  {%- endif -%}

    <td>
    {%- if s.last_heard_from_age -%}
      {{ s.last_heard_from_age }} <small>({{ s.last_heard_from_time }})</small>
    {%- endif -%}
    </td>
    <td>
    {{ s.connectCount }}
    </td>

  {% if s.connected %}
    {% if s.running_builds %}
      <td class="building">Running {{ s.running_builds }} build(s)</td>
    {% else %}
      <td class="idle">Idle</td>
    {% endif %}

  {% else %}
    <td class="offline">Not connected</td>
  {% endif %}

  </tr>
{% endfor %}
</table>

</div>

{% endblock %}
